package com.lc.app.myaccount.entity;

/**
 * Created by LC on 2/5/2016.
 * 支出 信息表
 */
public class OutAccount {
    private int _id;
    private double money;
    private String time;
    private String type;
    private String address;
    private String mark;
    private int userId;

    public OutAccount() {
    }

    public OutAccount(int _id, double money, String time, String type, String address, String mark,UserEntity user) {
        this._id = _id;
        this.money = money;
        this.time = time;
        this.type = type;
        this.address = address;
        this.mark = mark;
        this.userId = user.get_id();
    }

    public int get_id() {
        return _id;
    }

    public void set_id(int _id) {
        this._id = _id;
    }

    public double getMoney() {
        return money;
    }

    public void setMoney(double money) {
        this.money = money;
    }

    public String getTime() {
        return time;
    }

    public void setTime(String time) {
        this.time = time;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    public String getMark() {
        return mark;
    }

    public void setMark(String mark) {
        this.mark = mark;
    }

    public int getUserId() {
        return userId;
    }

    public void setUserId(int userId) {
        this.userId = userId;
    }

    @Override
    public String toString() {
        return "OutAccount{" +
                "_id=" + _id +
                ", money=" + money +
                ", time='" + time + '\'' +
                ", type='" + type + '\'' +
                ", address='" + address + '\'' +
                ", mark='" + mark + '\'' +
                '}';
    }

    public Object[] toAddArray(){
        return new Object[]{this.getMoney(),this.getTime(),this.getType(),this.getAddress(),this.getMark(),this.getUserId()};
    }

    public Object[] toUpdateArray(){
        return new Object[]{this.getMoney(),this.getTime(),this.getType(),this.getAddress(),this.getMark(),this.getUserId(),this.get_id()};
    }
}
